# def _test(a,b,func):
#     result = func(a,b)
#     return result
#
# num = eval(input("请输入一个匿名函数："))
# func_nuw = _test(11,22,num)
# print(func_nuw)
#


infors = [{"name": "xiaoming", "age": 23}, {"name": "xiaodeng", "age": 22}, {"name": "dage", "age": 50}]
#
# infors.sort(key=lambda x: x["age"], reverse=True)
# print(infors)
#
# sorted(infors, key=lambda dic: dic['age'])
# print(infors)

infor = [("xiaoming", 20), ("xiaodeng", 23), ("dage", 50)]

infor.sort(key= lambda x:x[1],reverse=True)
print(infor)